package com.softhis.rekrutacja.shared.services;

import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.softhis.rekrutacja.shared.beans.LoginBean;
import com.softhis.rekrutacja.shared.dto.UserDTO;
import com.softhis.rekrutacja.shared.services.UserService.SaveUserCode;

/**
 * @author Sasak
 *
 */
public interface UserServiceAsync {

	public void findUser(int userId, AsyncCallback<UserDTO> callback);

	public void deleteUser(int userId, AsyncCallback<Void> callback) throws Exception;

	public void saveUser(UserDTO user, AsyncCallback<SaveUserCode> callback);

	public void updateUser(UserDTO user, AsyncCallback<SaveUserCode> callback);

	public void getAllUsersList(AsyncCallback<List<UserDTO>> asyncCallback);
	
	public void refreshSession(AsyncCallback<LoginBean> callback);

	public void isSessionValid(String sessionID, AsyncCallback<String> asyncCallback);

	public void loginAlreadyInUse(String login, AsyncCallback<java.lang.Boolean> asyncCallback);

	public void loginUser(String login, String password, AsyncCallback<LoginBean> asyncCallback);

	public void logout(String sessionId, AsyncCallback<Void> asyncCallback);
}
